package com.ea.admin.mapper;

import com.ea.admin.pojo.dto.CompanyDto;
import com.ea.admin.pojo.po.AdminCompanyPermission;
import com.ea.admin.pojo.vo.account.ContactAdminVo;
import com.ea.common.mybatis.EmoAnalyBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AdminCompanyPermissionMapper extends EmoAnalyBaseMapper<AdminCompanyPermission> {
    List<Long> getCompanyPermissionListByAccountId(
            @Param("accountId") Long accountId
    );

    List<CompanyDto> getSameLevelCompanyList(
            @Param("accountId") Long accountId,
            @Param("supCompanyId") Long supCompanyId
    );

    List<Long> get123AccountIdListByCompanyId(
            @Param("companyId") Long companyId
    );

    List<ContactAdminVo> getAllAdminInfoByCompanyIdAndName(
            @Param("companyId") Long companyId,
            @Param("contactName") String contactName
    );

    int getMinLevelByAccountId(
            @Param("accountId") Long accountId
    );

    List<Long> getSubCompanyIdList(
            @Param("accountId") Long accountId,
            @Param("companyIdList") List<Long> companyIdList
    );
}
